package com.caipos.mqtt.entity;

import com.alibaba.fastjson2.annotation.JSONField;
import com.fasterxml.jackson.annotation.JsonFormat;
import lombok.AllArgsConstructor;
import lombok.Builder;
import lombok.Data;
import lombok.NoArgsConstructor;
import org.springframework.format.annotation.DateTimeFormat;

import java.util.Date;

@Data
@NoArgsConstructor
@AllArgsConstructor
@Builder
public class SensorDataDO {
    @JSONField(name="stationcode")
    private String stationcode;
    @JSONField(name="interval")
    private Integer interval;
    @JSONField(name="nodecode")
    private String nodecode;
    @JSONField(name="sensorcode")
    private String sensorcode;
    @JSONField(name="senval")
    private Double senval;
    @JSONField(name="sensormodel")
    private Integer sensormodel;
    @JSONField(name="sensortype")
    private Integer sensortype;

    @DateTimeFormat(pattern="yyyy-MM-dd HH:mm:ss")
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss",timezone = "GMT+8")
    @JSONField(name="thattime")
    private Date thattime;

}
